package com.zwj.design.test.behavior.strategy.character;

import com.zwj.design.test.behavior.strategy.behavior.AttackStrategy;
import lombok.NoArgsConstructor;
import lombok.Setter;

/**
 * @author 张文接
 * @version 1.0
 * @createTime 2024/3/14 23:09
 */
@Setter
@NoArgsConstructor
public abstract class GameCharacter {
    /**
     * 攻击策略抽象
     */
    public AttackStrategy attackStrategy;

    /**
     * 展示
     */
    public abstract void display();

    /**
     * 攻击
     */
    public void fight() {
        attackStrategy.attack();
    }
}
